﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GH.Web.Excel
{
    public partial class Excel : GH.Web.BasePage.PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            //Excel.Application app = new Excel.Application();
            //if (app == null)
            //{
            //    return;
            //}
            //app.Visible = false;
            //app.UserControl = true;
            //Workbooks workbooks = app.Workbooks;
            //_Workbook workbook = workbooks.Add(template_path + "\\测试.xls");//这里的Add方法里的参数就是模板的路径                            Sheets sheets = workbook.Worksheets;
            //_Worksheet worksheet = (_Worksheet)sheets.get_Item(1); //这里表示模板只有一个sheet表
            //if (worksheet == null)
            //{
            //    return;
            //}

        }
    }
}
